1. Technical Field
The present invention relates to an image brightness controlling device, and more particularly, to an image brightness controlling device and a method thereof, which improves the definition of brightness by the use of the definition of brightness of an entire image and/or locally improves the definition of brightness by the use of local brightness information.
2. Description of the Related Art
Conventional methods of controlling a dynamic range of an input image are described as follows. In the following description, it is assumed that the input image has an n-bit resolution (where n is a natural number).
(1) Contrast Enhancement
A dynamic range is controlled between 0 and 2n-1 by applying the minimum pixel value and the maximum pixel value in an image to Expression 1.Output=(2n−1)×(Input−Min)/(Max−Min)  Expression 1
Here, Output is a pixel value of an output image, Input is a pixel value of an input image, Max is the maximum pixel value of the input image, and Min is the minimum pixel value of the input image.
(2) Histogram Equalization
FIG. 1 is a transformation function graph of an input image and an output image to which a histogram equalization method is applied.
First, a cumulative density function (CDF) of pixel values in an image is calculated using histogram information of the image. Then, the scale of the cumulative density function is controlled between 0 and 2n-1 and the cumulative density function is used as a transformation function 100 of the input image and the output image.
When the number of specific pixel values is great, the slope of the transformation function 100 rapidly varies thereby enhancing the dynamic range of the corresponding pixel values.
In the contrast enhancement method or the histogram equalization method, the dynamic range is always controlled into values between 0 and 2n-1, regardless of the range of pixel values of the input image.
However, when the range of pixel values of the input image is very narrow but the dynamic range is forcibly enhanced into the values between 0 and 2n-1, the quality of image is not improved, but noises rather increases and the image is made to seem very unnatural.
In recent years, electronic apparatuses requiring an image processing device such as a digital camera, a camcorder, or a camera mounted on a mobile phone were widely used. When an image having high contrast is taken with the image processing device, an image biased to a dark side or a bright side is obtained. That is, when the dynamic range of an image is great, an image different from an image seen with a naked eye is obtained by the image processing device. Here, the dynamic range of an image means a range of brightness between the darkest part and the brightest part of the image. For example, when a person standing by a bright window is taken with a camera, an image of a dark person standing by the bright window is obtained which has been distinguished with a naked eye. An image improving algorithm such as a retinex algorithm is used to solve the above-mentioned problem.
An image brightness controlling method using a multi-scale retinex with color restoration (MSRCR) employs Expression 2.
                                                        R              i                        ⁡                          (                                                x                  1                                ,                                  x                  2                                            )                                =                                                    a                i                            ⁡                              (                                                      x                    1                                    ,                                      x                    2                                                  )                                      ⁢                                          ∑                                  k                  =                  1                                K                            ⁢                                                          ⁢                                                W                  k                                ⁡                                  (                                                            log                      ⁢                                                                                          ⁢                                                                        I                          i                                                ⁡                                                  (                                                                                    x                              1                                                        ,                                                          x                              2                                                                                )                                                                                      -                                          log                      ⁡                                              [                                                                                                            F                              k                                                        ⁡                                                          (                                                                                                x                                  1                                                                ,                                                                  x                                  2                                                                                            )                                                                                ×                                                                                    I                              i                                                        ⁡                                                          (                                                                                                x                                  1                                                                ,                                                                  x                                  2                                                                                            )                                                                                                      ]                                                                              )                                                                    ⁢                                  ⁢                              i            =            1                    ,          …          ⁢                                          ,          S                ⁢                                  ⁢                                                            F                k                            ⁡                              (                                                      x                    1                                    ,                                      x                    2                                                  )                                      =                          κ              ⁢                                                          ⁢                              exp                ⁡                                  [                                                            -                                              (                                                                              x                            1                            2                                                    +                                                      x                            2                            2                                                                          )                                                              /                                          σ                      k                      2                                                        ]                                                              ,                      κ            =                          1              /                              (                                                      ∑                                          x                      1                                                        ⁢                                                                          ⁢                                                            ∑                                              x                        2                                                              ⁢                                                                                  ⁢                                          F                      ⁡                                              (                                                                              x                            1                                                    ,                                                      x                            2                                                                          )                                                                                            )                                                    ⁢                                  ⁢                                            α              i                        ⁡                          (                                                x                  1                                ,                                  x                  2                                            )                                =                      log            (                                                            SI                  i                                ⁡                                  (                                                            x                      1                                        ,                                          x                      2                                                        )                                            /                                                ∑                                      n                    =                    1                                    S                                ⁢                                                                  ⁢                                                      I                    n                                    ⁡                                      (                                                                  x                        1                                            ,                                              x                        2                                                              )                                                                        )                                              Expression        ⁢                                  ⁢        2            
Here, i represents an order of a spectral band, S represents a gray image when it is “1” and represents a color image when it is “3”, (x1, x2) represents a coordinate of an image, I represents an input image, R represents an output image having been subjected to the MSRCR process, Fk represents a k-th Gaussian surround function, σk represents a standard deviation of the k-th Gaussian surround function, K represents the number of surround functions, Wk a weight (generally 1/K) associated with Fk, and αi represents a color restoration coefficient in an i-th spectral band.
Since the image brightness controlling method using Expression 2 is performed in a frequency domain, there is a problem with troublesome calculation such as Fourier transformation should be performed. In addition, plural frame memories for storing input images and Gaussian functions are required and an additional memory for storing a table for log calculation is also required. Since the calculation could not be performed in real time, there is also a problem in that the method could be performed only as a post process.